package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.PlanCar;
import com.pj.wisdomlogistics.mvp.contract.PlanCarContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.PlanCarModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;

import java.util.List;


public class PlanCarPresenter extends ActivityPresenter<PlanCarModel, PlanCarContract.View> implements PlanCarContract.Presenter {
    public static final String TAG = "PlanCarPresenter";


    @Override
    public void carTimeAxis(int carID) {
        addSubscription(getModel().carTimeAxis(carID), new FilterSubscriber<List<PlanCar>>() {
            @Override
            public void onNext(List<PlanCar> mList) {
                getView().onSuccess(mList);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().onError(errorMsg);
            }

        });
    }
}
